package main

import "fmt"

type Humaner interface {
	sayHi()
}

type Student struct {
	name string
}

type Teacher struct {
	subject string
}

func (this *Student)sayHi()  {
	fmt.Println((*this).name)
}

func (this Teacher)sayHi()  {
	fmt.Println(this.subject)
}

func main() {
	var inter Humaner
	stu := &Student{"Mr"}
	inter = stu
	inter.sayHi()

	tea := Teacher{"Eng"}
	inter = tea
	inter.sayHi()
}
